package com.muyu.system.domain.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.poi.xssf.model.Comments;

/**
 * @author Administrator
 */
@Getter
@AllArgsConstructor
public enum OrderSourceEnum {
    ORDER(1,"商城订单"),
    MARKET(2,"书画交易订单");




    @EnumValue
    @JsonValue
    private final int code;

    private final String name;



    @JsonCreator
    public static OrderSourceEnum getOrderSourceEnum(int code) {
        for (OrderSourceEnum value : OrderSourceEnum.values()) {
            if (value.getCode() == code) {
                return value;
            }
        }
        return null;
    }
}
